package elements;

import roborally.EnergyAmount;
import be.kuleuven.cs.som.annotate.Basic;

/**
 * @version	3.0
 * @author 	Lies Tambeur 	r0264469	2Bcwsbbh
 * @author	Eline Vanrykel	r0264543	2Bcwselt
 *
 */
public interface IEnergyHolder {
	
	/**
	 * @param 	energy
	 * @pre		| this.isLegalEnergy(energy)
	 * @post	| new.getEnergy() == energy
	 */
	public void setEnergy(EnergyAmount energy);

	@Basic
	public EnergyAmount getEnergy();
	
	/**
	 * @param 	amount
	 * @pre		| amount.getAmount() >= 0
	 */
	public void recharge(EnergyAmount amount);
	
	public boolean isLegalEnergy(EnergyAmount energy);
	
	public void decrease(EnergyAmount energy);

}
